<?php
	session_start();
	include ("../includes/conn.php");
	
	if (!isset($_SESSION['id'])){
		$_SESSION['id'] = md5(rand());
	}
	
	//add product to shopping cart
	if (isset($addsign) && $addsign == '1'){
		require_once("../includes/cart.php");
	}
	
	//update shopping cart when amount and/or promo code change
	if (isset($button) && $button == 'Update'){
		if ($qtychg <> ''){
			require_once("../includes/cart-upd.php");
		}
	}
	
	// delete selected product in shopping cart
	if (isset($button2) && $button2 == 'Remove'){
		require_once ('../includes/cart-delete.php');
	}
	
	//empty all products in shopping cart
	if (isset($button5) && $button5 == 'Clear All' ){
		require_once ('../includes/cart-empty.php');
	}
	
	//check out shopping cart for payment
	if (isset($button3) && $button3 == 'Check Out' ){
		echo "<script language=javascript>location.href='/cart-checkout.php';</script>";
		exit;
	}
	
	if (!isset($cart)){
		$cart = 0;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/logo.ico" type="image/x-icon">
<?php include ("../includes/title.php");?>
<link href="../style/abmnew.css" rel="stylesheet" type="text/css" />
<link href="../style/mirna.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#submenu {
	background:url(./images/sirna-banner.jpg) right top;
	background-repeat:no-repeat;
}
#prod-name {
	font-family:Arial, Helvetica, sans-serif;
	font-weight:bold;
	font-size:16px;
	color:#000;
	margin-top:-1px;
}
</style>
</head>
<body>
<script type="text/javascript">
	function vectorpage(param){
	window.open("/vectors/vectorDisplay.php?vec=" + param,"_blank","directories=no,width=1000px,height=650px,left=0,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
	}
</script>
<?php include ("../includes/header.php");?>
<div id="content">
<?php include ("../includes/logosearch.php");?>
<div id='container'>
  <div id='leftmenu'>
    <?php include ("../includes/leftMenu.php");?>
  </div>
  <div id='rightcontent'>
    <div id='submenu'>
      <div id='subtitle'><?php echo"$catname";?></div>
    </div>
    <?php include ("../includes/premadeSiRNAsrch.php");?>
    <div id='title'>
      <?php 
		//get pathway
		$grp = "select * from category where sn = 8";
		$grp_res = mysql_query($grp,$db);
		$grp_rows = mysql_num_rows ($grp_res);
		if ($grp_rows > 0){
			$grp_r = mysql_fetch_array($grp_res);
			$grpName = $grp_r['cname'];
			
			$sub = "select * from subcat where csn = 8 and sn = $ssn";
			$sub_res = mysql_query($sub,$db);
			$sub_rows = mysql_num_rows ($sub_res);
			if ($sub_rows > 0){
				$sub_r = mysql_fetch_array($sub_res);
				$subName = $sub_r['sname'];
			}
		}
		echo "$prodname siRNA Lentivirus";
	?>
    </div>
    <div id='backbutton'> <?php echo "<span><a href='index.php?csn=$csn' title='Premade/Pre-made siRNA Lentiviruses'>$catname</a> &raquo; <a href='ProdList.php?csn=$csn&ssn=$ssn&alpha=$alpha' title='$subName siRNA Lentiviruses'>$subName siRNA Lentiviruses</a></span> <a href='ProdList.php?csn=$csn&ssn=$ssn&alpha=$alpha"?>'><img src="/StemCell/images/arrow.png" width="5" height="10" border="0" /> Back</a> </div>
    <div id='prod-tab'>
        <?php
			//sets required variables if not set
			if (isset ($cart)){} else{$cart=0;}
            if (isset ($page)){} else{$page="data";}
			?>
        <?php
			//displays tabs in different forms based on 'page type' selected, they are in seperate php tags as otherwise no space appears between the tabs 
			if ($page=="data"){
				echo "<div id='tab-focus'>Data Sheet</div>";
			}else{
				echo "<div id='tab-leave'><a href='../expression/dispOne.php?page=data&cart=$cart&csn=$csn&ssn=$ssn&dsn=$dsn&catno=$catno'>Data Sheet</a></div>";
			}
			
			echo "
				<div id='tab-leave'>Protocol</div>
				<div id='tab-leave'>MSDS</div>
				<div id='tab-leave'><a href='#faqs'>FAQs</a></div>
				<div id='tab-leave'>Reviews</div>";
				
				if (isset($_SESSION['usr']) && isset($_SESSION['admin'])){
					if ($_SESSION['admin']<>3){
						echo "
							<div id='tab-leave'><a href='../admin/siRNAEdit.php?csn=$csn&ssn=$ssn&dsn=$dsn&catno=$catno'>Edit</a></div>
							<div id='tab-leave'>Delete</div>
						";
					}
				}
			?>
    </div>
    <div id='prod-detail'>
      <div id='order'>
        <div id='prod-name'><?php echo"$prodname siRNA Lentivirus";?></div>
        <div id='order-online'>Order Online</div>
        <div id='order-bycontact'>Order by Contact</div>
        <div id='addtocart'>
          <form id='form1' name='form1' method='post' action=''>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="41%"><span>Cat.No.:</span></td>
                <td width="59%"><?php echo $pdr['catNo']; ?></td>
              </tr>
              <tr>
                <td>Quantity:</td>
                <td><?php echo $pdr['quantity']; ?></td>
              </tr>
              <tr>
                <td>Price:</td>
                <td><span style='color:#F60; font-weight:bold;'>
				<?php 
					if ($pdr['price'] == 0 ){
						echo"Inquire";
					}else{
						$price = $pdr['price'];
						echo"$$price";
					}?>													
              </tr>
              <tr>
                <td colspan="2" style="height:30px; vertical-align:bottom;">Qty.:
                  <input name="orderquan" type="text" id="orderquan" size="1" value="1" style="border:1px dotted #999; font-size:12px; color:#039; padding:1px; font-weight:bold;" />
                  <input type="submit" name="add" id="add" value="Add to Cart" />
                  <input name='catno' type='hidden' id='catno' value='<?php echo $pdr['catNo'];?>'/>
                  <input name='quan' type='hidden' id='quan' value='<?php echo $pdr['quantity'];?>'/>
                  <input name='price' type='hidden' id='price' value='<?php echo $pdr['price'];?>'/>
                  <input name='pname' type='hidden' id='pname' value='<?php echo $pdr['pname'];?>'/>
                  <input name='supplier' type='hidden' id='supplier' value='<?php echo $pdr['supplier'];?>'/>
                  <input name='csn' type='hidden' id='csn' value='<?php echo $csn;?>'/>
                  <input name='ssn' type='hidden' id='ssn' value='<?php echo $ssn;?>'/>
                  <input name='dsn' type='hidden' id='dsn' value='<?php echo $dsn;?>'/>
                  <input name='pcat' type='hidden' id='pcat' value='<?php echo $csn;?>'/>
                  <input name='car' type='hidden' id='car' value='1'/>
                  <input type="hidden" name="addsign" id="addsign" value='1' /></td>
              </tr>
            </table>
          </form>
        </div>
        <div id='contactinfo'>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="19%">Email:</td>
              <td width="81%"><a href='mailto:order@abmGood.com'>order@abmGood.com</a></td>
            </tr>
            <tr>
              <td>Phone:</td>
              <td><span style="font-size:13px;">604-247-2416 (Local), 1-866-757-2414 (Toll free)</span></td>
            </tr>
            <tr>
              <td>Fax:</td>
              <td><span style="font-size:13px;">604-247-2414</span></td>
            </tr>
            <tr>
              <td>Payment:</td>
              <td><img src='/img/mastercard.gif' width='25' height='16' border='0' align='absmiddle' /> <img src='/img/visa.gif' width='25' height='16' border='0' align='absmiddle' /> or Purchase Order Number</td>
            </tr>
            <tr>
              <td>More info:</td>
              <td><a href="../misc/orders.php">Contact information for ABM in Canada</a></td>
            </tr>
          </table>
        </div>
      </div>
      <div id='cart'><a href='?cart=<?php echo ($cart+1)%2;?>&amp;catno=<?php echo "$catno&amp;csn=$csn&amp;ssn=$ssn&amp;dsn=$dsn&alpha=$alpha"; ?>'><img id="carttab" src="/images/cart.png" border="0" /></a></div>
      <?php include('../includes/shoppingCart.php');?> 
      <?php
			  //displays data sheet information for ALL product types
			 switch ($page){
				case "data":
					$pdsql="select * from prodsirna where catNo='$catno'";
					$pdres=mysql_query($pdsql,$db);
					$pdrw=mysql_num_rows($pdres);
					if ($pdrw>0){
					  //displays data sheet information for ALL product types
							echo"
							<div id='tab-title'>Data Sheet</div>
							<div id='tab-detail'>
							<table width='100%' border='0' cellspacing='0' cellpadding='0'>
							  <tr>
									<td width='26%'></td>
									<td width='74%' style='text-align:right; font-size:12px;'><a href='./sirnaPrint.php?csn=$csn&ssn=$ssn&dsn=$dsn&catno=$catno' target='_blank'>Print Version</a></td>
							  </tr>
						";
							while ($pdr=mysql_fetch_array($pdres)){
								if ($pdr['Species']<>""){
									echo"
									  <tr>
										<td><span>Species</span></td>
										<td>".$pdr['Species']."</td>
									  </tr>";
								}
								if ($pdr['AccessionNumber']<>""){
									echo"
									  <tr>
										<td><span>Accession Number</span></td>
										<td>".$pdr['AccessionNumber']."</td>
									  </tr>";
								}
								if ($pdr['Vector']<>""){
									echo"
									  <tr>
										<td><span>Vector</span></td>
										<td><a href='#' onclick=vectorpage(\"".$pdr['Vector']."\")>".$pdr['Vector']."</a></td>
									  </tr>";
								}
								if ($pdr['TargetSequence']<>""){
									echo"
									  <tr>
										<td><span>Target Sequence</span></td>
										<td>".html_entity_decode($pdr['TargetSequence'])."</td>
									  </tr>";
								}
								if ($pdr['KnockdownEfficiencyForCell']<>""){
									echo"
									  <tr>
										<td><span>Knockdown Efficiency</span></td>
										<td>".$pdr['KnockdownEfficiencyForCell']."</td>
									  </tr>";
								}
								if ($pdr['SequencePrimers']<>""){
									echo"
									  <tr>
										<td><span>Sequence Primers</span></td>
										<td>".$pdr['SequencePrimers']."</td>
									  </tr>";
								}
								if ($pdr['BactSelectionMarker']<>""){
									echo"
									  <tr>
										<td><span>Bacterial Selection</span></td>
										<td>".$pdr['BactSelectionMarker']."</td>
									  </tr>";
								}
								if ($pdr['SelectiveMarker']<>""){
									echo"
									  <tr>
										<td><span>Mammalian Selection</span></td>
										<td>".$pdr['SelectiveMarker']."</td>
									  </tr>";
								}
								if ($pdr['Format']<>""){
									echo"
									  <tr>
										<td><span>Format</span></td>
										<td>".$pdr['Format']."</td>
									  </tr>";
								}
								if ($pdr['Appearance']<>""){
									echo"
									  <tr>
										<td><span>Appearance</span></td>
										<td>".$pdr['Appearance']."</td>
									  </tr>";
								}
								if ($pdr['StorageTemperature']<>""){
									echo"
									  <tr>
										<td><span>Storage</span></td>
										<td>".$pdr['StorageTemperature']."</td>
									  </tr>";
								}
								if ($pdr['ShelfLife']<>""){
									echo"
									  <tr>
										<td><span>Shelf Life</span></td>
										<td>".$pdr['ShelfLife']."</td>
									  </tr>";
								}
								if ($pdr['Shipping']<>""){
									echo"
									  <tr>
										<td><span>Shipping</span></td>
										<td>".$pdr['Shipping']."</td>
									  </tr>";
								}
								if ($pdr['QualityControlMethod']<>""){
									echo"
									  <tr>
										<td><span>Quality Control</span></td>
										<td>".$pdr['QualityControlMethod']."</td>
									  </tr>";
								}
								
								echo"
									  <tr>
										<td><span>Caution</span></td>
										<td>This product is for research use only and is not intended for therapeutic or diagnostic applications. Please contact a technical service representative for more information.</td>
									  </tr>";
								
							}
					  			
					 		echo"</table>
						</div>
						<a name='faqs'></a>
						<div id='tab-title'>FAQs</div>
							<div id='tab-detail'>";
							include ("../FAQ/faq.php");
						echo "
							</div>
						</div>";
					}
				    break;
					//displays MSDS information for virus products
					case "MSDS":
						echo "
						<div id='tab-title'>MSDS</div>
							<div id='MSDS'>";
							include ("../includes/UTRChemMSDS.php");
						echo "
							</div>
						</div>
						";
					 break;
					//displays protocol information for adeno products 
					case "protocol":
						echo "
						<div id='tab-title'>Protocol</div>
							<div id='MSDS'>";
							include ("../includes/$protocol.php");
						echo "
							</div>
						</div>
						";
					 break;
				  }
			 ?>
      </div>
    </div>
  </div>
</div>
<?php include('../includes/footer.php');?>

<!-- Piwik --> 
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.abmgood.com/piwik/" : "http://www.abmgood.com/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<noscript>
<p><img src="http://www.abmgood.com/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p>
</noscript>
<!-- End Piwik Tag -->
</body>
</html>